import request from '../Utils/request'

export function GetUsers(params){
    return request.get(`/users`,{params:params})
}
export function getById(id){
    return request.get(`/users/${id}`)
}
export function addPost(data){
    return request.post(`/users`,data)
}
export function PasswordPost(data){
    return request.post(`/users/password`,data)
}
//修改用户名密码
export function updatePut(id,data){
    return request.put(`/users/${id}`,data)
}
//修改用户状态
export function updateStatusPut(data){
    return request.put(`/users/status`,data)
}
//修改头像
export function updatePicturePut(data){
    return request.post(`/users/userpicture`,data)
}
export function deleteId(id){
    return request.delete(`/users/${id}`)
}
export function Login(data){
    return request.post(`/users/token`,data);
}
export function Register(data){
    return request.post(`/users/`,data)
}